<?php
  /*
    srcstr
      dbconnect.inc.php - database connection unit
      (c)2006-2012 Matthew Hipkin <http://www.matthewhipkin.co.uk>
  */
  include("miscfunc.inc.php");
  $dbconn = @mysql_connect($dbserver,$dbuser,$dbpass);
  if(!$dbconn) die(doSimpleXML("response",Array("errorCode" => "101", "errorText" => "Unable to connect to database")));
  $db = @mysql_select_db($dbname,$dbconn);  
  if(!$db) die(doSimpleXML("response",Array("errorCode" => "102", "errorText" => "Unable to select database")));
?>
